/*
 *  File : URLEntry.java
 *  Created By : madhurt
 *  Created On : Oct 27, 2010
 *  Yahoo! 2010
 */

package com.gebogebo;

import com.google.appengine.api.datastore.Link;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 *
 * @author madhurt
 */
@PersistenceCapable
public class URLEntry {

    @Persistent
    @PrimaryKey
    private String shortKey;
    
    @Persistent
    private Link longUrl;

    public URLEntry(String shortKey, Link longUrl) {
        this.shortKey = shortKey;
        this.longUrl = longUrl;
    }

    /**
     * @return the shortKey
     */
    public String getShortKey() {
        return shortKey;
    }

    /**
     * @param shortKey the shortKey to set
     */
    public void setShortKey(String shortKey) {
        this.shortKey = shortKey;
    }

    /**
     * @return the longUrl
     */
    public Link getLongUrl() {
        return longUrl;
    }

    /**
     * @param longUrl the longUrl to set
     */
    public void setLongUrl(Link longUrl) {
        this.longUrl = longUrl;
    }

    @Override
    public String toString() {
        return shortKey + " => " + longUrl;
    }
    
    
}
